import request from '@/plugin/axios'
import { sysPath } from '@api/sys.common'

export function getCarouselList(params) {
	return request({
		url: sysPath + '/hx-mart/api/v1/ad/list',
		method: 'post',
		params
	})
}

export function getCarouselDetail(params) {
	return request({
		url: sysPath + '/hx-mart/api/v1/ad/content',
		method: 'post',
		params
	})
}

export function addCarousel(data) {
	return request({
		url: sysPath + '/hx-mart/api/v1/ad/add',
		method: 'post',
		data
	})
}

export function editCarousel(data) {
	return request({
		url: sysPath + '/hx-mart/api/v1/ad/edit',
		method: 'post',
		data
	})
}

export function editCarouselDetail(params) {
	return request({
		url: sysPath + '/hx-mart/api/v1/ad/content/edit',
		method: 'post',
		params
	})
}